package itheima.com.tabhostdemo;

import android.support.v4.app.Fragment;

/**
 * 底部功能标签的枚举类
 *
 */
public enum MainTab {
    TAB_NEWS("news", "新闻", DefaultFragment.class),
    TAB_TWEETS("tweets", "动弹", DefaultFragment.class),
    TAB_DISCOVER("discover", "发现", DefaultFragment.class);

  private  MainTab(String tag, String title, Class<? extends Fragment> clz){
      this.tag = tag;
      this.title = title;
      this.clz = clz;
  }
    private String tag;//标记
    private String title;//标签的标题
    private Class<? extends Fragment>  clz;
    public Class<? extends Fragment> getClz() {
        return clz;
    }
    public String getTag() {
        return tag;
    }
    public String getTitle() {
        return title;
    }
}

/*
定义带私有构造方法的类
public class MainTab{
    MainTab MAINTAB1=new MainTab();
    MainTab MAINTAB2=new MainTab();
    MainTab MAINTAB3=new MainTab();
    private MainTab(){
    }
    private String tag;//标记
    private String title;//标签的标题
    private Class<? extends Fragment>  clz;

    public Class<? extends Fragment> getClz() {
        return clz;
    }
    public String getTag() {
        return tag;
    }
    public String getTitle() {
        return title;
    }
}*/
